import java.util.Stack;

/**
 * @author 03010570
 * @date 2020/06/30
 *          LeetCode : 53 、从 0~n-1 中缺失的数字   https://leetcode-cn.com/problems/que-shi-de-shu-zi-lcof/
 */
public class LeetCode_sword_offer_53 {

    public static void main(String[] args) {
        System.out.println(missingNumber(new int[]{0}));
    }

    public static int missingNumber(int[] nums) {
        for(int i =0;i < nums.length; i++){
            if(i != nums[i]){
                return i;
            }
        }
        return -1;
    }

}
